<div class="row animated" ng-class="{true: 'fadeInRight', false:'fadeInLeft'}[currentAnimated]">
  <div class="panel panel-default">
    <div class="panel-heading">
      <a ng-click="discard()" href="javascript:;"><i class="backBtn fa fa-arrow-circle-left"></i></a>
      <span class="panelTitle" ng-bind="PosterForm.title"></span>
    </div>
    <div class="panel-body">
      <form novalidate name="posterForm" class="form-horizontal" role="form">
        <div class="form-group">
          <label class="control-label col-xs-3 col-md-2">轮播广告图片：</label>
          <div class="col-xs-7 col-md-8">
            <a ng-if="poster.icon" href="{{poster.icon}}" class="fl whiteblock" target="_blank">
              <img ng-src="{{poster.icon}}" width="800" border="0">
            </a>
            <input type="text" readonly class="form-control" name="icon" ng-model="poster.icon" placeholder="轮播广告图片" style="display:none;">
            <div class="button btn btn-primary fl" ngf-select="upload($file)" ngf-pattern="'image/*'"
              ngf-accept="'image/*'" ngf-max-size="10MB">上传图片</div>
            <a href="javascript:void(0)" class="btn btn-info ml15" ng-click="openPhotoLibs()">图片库</a><span class="clearfix"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="control-label col-xs-3 col-md-2">轮播广告标题：</label>
          <div class="col-xs-7 col-md-8">
            <input type="text" class="form-control" name="title" placeholder="轮播广告标题" ng-model="poster.title" >
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': posterForm.name.$invalid && posterForm.name.$dirty}">
          <label class="control-label col-xs-3 col-md-2">轮播广告描述：</label>
          <div class="col-xs-7 col-md-8">
            <input type="text" class="form-control" name="name" placeholder="轮播图片描述" ng-model="poster.name" required>
          </div>
        </div>
        <div class="form-group">
          <label class="control-label col-xs-3 col-md-2">跳转地址：</label>
          <div class="col-xs-7 col-md-8">
            <input type="text" class="form-control" name="url" placeholder="跳转地址" ng-model="poster.url" >
          </div>
        </div>
        <div class="form-group">
          <label class="control-label col-xs-3 col-md-2">广告类型：</label>
          <div class="col-xs-7 col-md-8">
            <input type="text" class="form-control w25c" name="type" placeholder="广告类型" ng-model="poster.type" >
          </div>
        </div>
        <div class="form-group">
          <label class="control-label col-xs-3 col-md-2">排序：</label>
          <div class="col-xs-7 col-md-8">
            <input type="number" class="form-control w25c" name="sort" placeholder="排序" ng-model="poster.sort" >
          </div>
        </div>
        <div class="form-group">
          <div class="col-xs-4 col-xs-offset-2">
            <button class="btn btn-primary" ng-click="submitForm()" ng-disabled="posterForm.$invalid">保存</button>
            <button class="btn btn-white" ng-click="discard()">取消</button>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>